<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#222" media="(prefers-color-scheme: dark)"><meta name="generator" content="Hexo 7.3.0">

  <link rel="apple-touch-icon" sizes="180x180" href="/favicon.ico">
  <link rel="icon" type="image/png" sizes="32x32" href="/favicon.ico">
  <link rel="icon" type="image/png" sizes="16x16" href="/favicon.ico">
  <link rel="mask-icon" href="/favicon.ico" color="#222">

<link rel="stylesheet" href="/css/main.css">



<link rel="stylesheet" href="/lib/@fortawesome/fontawesome-free/css/all.min.css" integrity="sha256-5eIC48iZUHmSlSUz9XtjRyK2mzQkHScZY1WdMaoz74E=" crossorigin="anonymous">
  <link rel="stylesheet" href="/lib/animate.css/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">

<script class="next-config" data-name="main" type="application/json">{"hostname":"blog.dqv5.com","root":"/","images":"/images","scheme":"Mist","darkmode":true,"version":"8.21.1","exturl":false,"sidebar":{"position":"right","width_expanded":320,"width_dual_column":240,"display":"always","padding":18,"offset":12},"hljswrap":true,"copycode":{"enable":true,"style":null},"fold":{"enable":true,"height":500},"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":"gitalk","storage":true,"lazyload":false,"nav":null,"activeClass":"gitalk"},"stickytabs":false,"motion":{"enable":true,"async":true,"transition":{"menu_item":"fadeInDown","post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"},"path":"/search.xml","localsearch":{"enable":true,"top_n_per_article":1,"unescape":false,"preload":false,"trigger":"auto"}}</script><script src="/js/config.js"></script>

    <meta name="description" content="安装系统、设置远程连接、安装软件包、设置防火墙、安装docker、安装seafile">
<meta property="og:type" content="article">
<meta property="og:title" content="从头开始在树莓派上搭建seafile私有云">
<meta property="og:url" content="http://blog.dqv5.com/2020/09/19/raspberry-startup/index.html">
<meta property="og:site_name" content="dqv5.com">
<meta property="og:description" content="安装系统、设置远程连接、安装软件包、设置防火墙、安装docker、安装seafile">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://image.dqv5.com/blog/2020/09/19/1600451482010.jpg">
<meta property="og:image" content="https://image.dqv5.com/blog/2020/09/19/1600450647761.png">
<meta property="og:image" content="https://image.dqv5.com/blog/2020/09/19/1600450739755.png">
<meta property="og:image" content="https://image.dqv5.com/blog/2020/09/20/1600537498438.png">
<meta property="og:image" content="https://image.dqv5.com/blog/2020/09/20/1600537519653.png">
<meta property="og:image" content="https://image.dqv5.com/blog/2020/09/20/1600537935223.png">
<meta property="article:published_time" content="2020-09-19T01:41:47.000Z">
<meta property="article:modified_time" content="2024-11-23T11:58:37.867Z">
<meta property="article:author" content="du qian">
<meta property="article:tag" content="树莓派">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://image.dqv5.com/blog/2020/09/19/1600451482010.jpg">


<link rel="canonical" href="http://blog.dqv5.com/2020/09/19/raspberry-startup/">


<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-CN","comments":true,"permalink":"http://blog.dqv5.com/2020/09/19/raspberry-startup/","path":"2020/09/19/raspberry-startup/","title":"从头开始在树莓派上搭建seafile私有云"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>从头开始在树莓派上搭建seafile私有云 | dqv5.com</title>
  

  <script src="/js/third-party/analytics/baidu-analytics.js"></script>
  <script async src="https://hm.baidu.com/hm.js?1752ae624eedea5ce859335ad2f0e657"></script>







  <noscript>
    <link rel="stylesheet" href="/css/noscript.css">
  </noscript>
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <div class="column">
      <header class="header" itemscope itemtype="http://schema.org/WPHeader"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">dqv5.com</p>
      <i class="logo-line"></i>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger" aria-label="搜索" role="button">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a></li><li class="menu-item menu-item-tags"><a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签<span class="badge">49</span></a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类<span class="badge">20</span></a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档<span class="badge">61</span></a></li><li class="menu-item menu-item-留言板"><a href="/message-board/" rel="section"><i class="fa fa-comments fa-fw"></i>留言板</a></li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
      <div class="search-header">
        <span class="search-icon">
          <i class="fa fa-search"></i>
        </span>
        <div class="search-input-container">
          <input autocomplete="off" autocapitalize="off" maxlength="80"
                placeholder="搜索..." spellcheck="false"
                type="search" class="search-input">
        </div>
        <span class="popup-btn-close" role="button">
          <i class="fa fa-times-circle"></i>
        </span>
      </div>
      <div class="search-result-container">
        <div class="search-result-icon">
          <i class="fa fa-spinner fa-pulse fa-5x"></i>
        </div>
      </div>
    </div>
  </div>

</header>
        
  
  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C"><span class="nav-text">准备工作</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85%E7%B3%BB%E7%BB%9F"><span class="nav-text">安装系统</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E8%AE%BE%E7%BD%AE%E8%87%AA%E5%8A%A8%E8%BF%9E%E6%8E%A5WiFi"><span class="nav-text">设置自动连接WiFi</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%90%AF%E7%94%A8SSH"><span class="nav-text">启用SSH</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%BC%80%E6%9C%BA%E4%BD%BF%E7%94%A8"><span class="nav-text">开机使用</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%90%AF%E7%94%A8root%E8%B4%A6%E5%8F%B7"><span class="nav-text">启用root账号</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%BD%BF%E7%94%A8root%E8%B4%A6%E5%8F%B7%E8%BF%9B%E8%A1%8Cssh%E7%99%BB%E5%BD%95"><span class="nav-text">使用root账号进行ssh登录</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%BF%AE%E6%94%B9pi%E8%B4%A6%E5%8F%B7%E5%AF%86%E7%A0%81"><span class="nav-text">修改pi账号密码</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#VNC%E8%BF%9C%E7%A8%8B%E6%A1%8C%E9%9D%A2"><span class="nav-text">VNC远程桌面</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%88%87%E6%8D%A2%E5%9B%BD%E5%86%85%E7%9A%84%E8%BD%AF%E4%BB%B6%E9%95%9C%E5%83%8F%E6%BA%90"><span class="nav-text">切换国内的软件镜像源</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E9%85%8D%E7%BD%AE%E9%98%B2%E7%81%AB%E5%A2%99%EF%BC%88iptables%EF%BC%89"><span class="nav-text">配置防火墙（iptables）</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E9%85%8D%E7%BD%AE%E9%98%B2%E7%81%AB%E5%A2%99%EF%BC%88ufw%EF%BC%89"><span class="nav-text">配置防火墙（ufw）</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85docker"><span class="nav-text">安装docker</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%88%87%E6%8D%A2docker%E5%9B%BD%E5%86%85%E9%95%9C%E5%83%8F%E5%9C%B0%E5%9D%80"><span class="nav-text">切换docker国内镜像地址</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85seafile"><span class="nav-text">安装seafile</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%9C%80%E5%90%8E"><span class="nav-text">最后</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%90%8E%E7%BB%AD"><span class="nav-text">后续</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#seafile%E8%BD%AF%E4%BB%B6%E5%B1%95%E7%A4%BA"><span class="nav-text">seafile软件展示</span></a></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="du qian"
      src="/images/soccer.jpg">
  <p class="site-author-name" itemprop="name">du qian</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">61</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/categories/">
        <span class="site-state-item-count">20</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
          <a href="/tags/">
        <span class="site-state-item-count">49</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author animated">
      <span class="links-of-author-item">
        <a href="https://github.com/duqian42707" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;duqian42707" rel="noopener me" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://stackoverflow.com/duqian42707" title="StackOverflow → https:&#x2F;&#x2F;stackoverflow.com&#x2F;duqian42707" rel="noopener me" target="_blank"><i class="fab fa-stack-overflow fa-fw"></i>StackOverflow</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://blog.csdn.net/duqian42707" title="CSDN → https:&#x2F;&#x2F;blog.csdn.net&#x2F;duqian42707" rel="noopener me" target="_blank"><i class="fas fa-link fa-fw"></i>CSDN</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://duqian42707.github.io/qiniu-host" title="图床 → https:&#x2F;&#x2F;duqian42707.github.io&#x2F;qiniu-host" rel="noopener me" target="_blank"><i class="far fa-image fa-fw"></i>图床</a>
      </span>
  </div>

        </div>
      </div>
    </div>

    
  </aside>


    </div>

    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://blog.dqv5.com/2020/09/19/raspberry-startup/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/soccer.jpg">
      <meta itemprop="name" content="du qian">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="dqv5.com">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
      <meta itemprop="name" content="从头开始在树莓派上搭建seafile私有云 | dqv5.com">
      <meta itemprop="description" content="">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          从头开始在树莓派上搭建seafile私有云
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2020-09-19 01:41:47" itemprop="dateCreated datePublished" datetime="2020-09-19T01:41:47+00:00">2020-09-19</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar-check"></i>
      </span>
      <span class="post-meta-item-text">更新于</span>
      <time title="修改时间：2024-11-23 11:58:37" itemprop="dateModified" datetime="2024-11-23T11:58:37+00:00">2024-11-23</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E6%A0%91%E8%8E%93%E6%B4%BE/" itemprop="url" rel="index"><span itemprop="name">树莓派</span></a>
        </span>
    </span>

  
    <span class="post-meta-item" title="阅读次数" id="busuanzi_container_page_pv">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="post-meta-item-text">阅读次数：</span>
      <span id="busuanzi_value_page_pv"></span>
    </span>
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody"><p>摘要：安装系统、设置远程连接、安装软件包、设置防火墙、安装docker、安装seafile</p>
<!-- more -->



<h2 id="准备工作"><a href="#准备工作" class="headerlink" title="准备工作"></a>准备工作</h2><ul>
<li>树莓派主板（装好散热片或散热外壳）</li>
<li>SD卡</li>
<li>电源</li>
<li>电脑</li>
</ul>
<p><img src="https://image.dqv5.com/blog/2020/09/19/1600451482010.jpg"></p>
<h2 id="安装系统"><a href="#安装系统" class="headerlink" title="安装系统"></a>安装系统</h2><p><strong>Raspberry Pi OS</strong> (previously called Raspbian) 树莓派官方系统下载地址：<a target="_blank" rel="noopener" href="https://www.raspberrypi.org/downloads/">https://www.raspberrypi.org/downloads/</a></p>
<p>Raspberry Pi OS (64 bit) beta test version 下载地址：<a target="_blank" rel="noopener" href="https://www.raspberrypi.org/forums/viewtopic.php?f=117&t=275370">https://www.raspberrypi.org/forums/viewtopic.php?f=117&amp;t=275370</a></p>
<p>（目前官方还没有出64位系统的正式版本）</p>
<p>将SD卡通过读卡器连接到你的电脑上，使用官方的工具（<strong>Raspberry Pi Imager</strong>）往SD卡中烧录系统。</p>
<p><img src="https://image.dqv5.com/blog/2020/09/19/1600450647761.png"></p>
<h2 id="设置自动连接WiFi"><a href="#设置自动连接WiFi" class="headerlink" title="设置自动连接WiFi"></a>设置自动连接WiFi</h2><p>在电脑上打开SD卡，在<code>/boot</code>目录中创建文件<code>wpa_supplicant.conf</code>，文件内容如下</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">country=CN</span><br><span class="line">ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev</span><br><span class="line">update_config=1</span><br><span class="line"></span><br><span class="line">network=&#123;</span><br><span class="line">  ssid=<span class="string">&quot;WiFi-B&quot;</span>		  <span class="comment"># ssid:网络的ssid</span></span><br><span class="line">  psk=<span class="string">&quot;12345678&quot;</span>		<span class="comment"># psk:密码</span></span><br><span class="line">  key_mgmt=WPA-PSK	<span class="comment"># WiFi 使用WPA/WPA2加密</span></span><br><span class="line">  priority=1			  <span class="comment"># priority:连接优先级，数字越大优先级越高（不可以是负数）</span></span><br><span class="line">  scan_ssid=0   		<span class="comment"># scan_ssid:连接隐藏WiFi时需要指定该值为1</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>



<p>扩展配置</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 如果你的 WiFi 没有密码</span></span><br><span class="line">network=&#123;</span><br><span class="line">  ssid=<span class="string">&quot;你的无线网络名称（ssid）&quot;</span></span><br><span class="line">  key_mgmt=NONE</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment"># 如果你的 WiFi 使用WEP加密</span></span><br><span class="line">network=&#123;</span><br><span class="line">  ssid=<span class="string">&quot;你的无线网络名称（ssid）&quot;</span></span><br><span class="line">  key_mgmt=NONE</span><br><span class="line">  wep_key0=<span class="string">&quot;你的wifi密码&quot;</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment"># 如果你的 WiFi 使用WPA/WPA2加密</span></span><br><span class="line">network=&#123;</span><br><span class="line">  ssid=<span class="string">&quot;你的无线网络名称（ssid）&quot;</span></span><br><span class="line">  key_mgmt=WPA-PSK</span><br><span class="line">  psk=<span class="string">&quot;你的wifi密码&quot;</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>



<h2 id="启用SSH"><a href="#启用SSH" class="headerlink" title="启用SSH"></a>启用SSH</h2><p>在电脑上打开SD卡，在<code>/boot</code>目录中创建一个名为<code>ssh</code>的空文件即可。</p>
<h2 id="开机使用"><a href="#开机使用" class="headerlink" title="开机使用"></a>开机使用</h2><p>将SD卡插到树莓派上，将树莓派连接到电源，它会自动开机。等两分钟左右，在电脑上访问路由器管理界面，查到树莓派的ip地址，通过ssh进行连接。</p>
<p>注： 初始用户：<code>pi</code> , 初始密码: <code>raspberry</code></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line">➜  ~ ssh pi@192.168.0.108</span><br><span class="line">The authenticity of host <span class="string">&#x27;192.168.0.108 (192.168.0.108)&#x27;</span> can<span class="string">&#x27;t be established.</span></span><br><span class="line"><span class="string">ECDSA key fingerprint is SHA256:MBPMUz59cqFAOVXVA/Wif4hj2fA0hCDEsrSRIjg/ef0.</span></span><br><span class="line"><span class="string">Are you sure you want to continue connecting (yes/no/[fingerprint])? yes</span></span><br><span class="line"><span class="string">Warning: Permanently added &#x27;</span>192.168.0.108<span class="string">&#x27; (ECDSA) to the list of known hosts.</span></span><br><span class="line"><span class="string">pi@192.168.0.108&#x27;</span>s password:</span><br><span class="line">Linux raspberrypi 5.4.42-v8+ <span class="comment">#1319 SMP PREEMPT Wed May 20 14:18:56 BST 2020 aarch64</span></span><br><span class="line"></span><br><span class="line">The programs included with the Debian GNU/Linux system are free software;</span><br><span class="line">the exact distribution terms <span class="keyword">for</span> each program are described <span class="keyword">in</span> the</span><br><span class="line">individual files <span class="keyword">in</span> /usr/share/doc/*/copyright.</span><br><span class="line"></span><br><span class="line">Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent</span><br><span class="line">permitted by applicable law.</span><br><span class="line">Last login: Wed May 27 18:13:46 2020</span><br><span class="line"></span><br><span class="line">SSH is enabled and the default password <span class="keyword">for</span> the <span class="string">&#x27;pi&#x27;</span> user has not been changed.</span><br><span class="line">This is a security risk - please login as the <span class="string">&#x27;pi&#x27;</span> user and <span class="built_in">type</span> <span class="string">&#x27;passwd&#x27;</span> to <span class="built_in">set</span> a new password.</span><br><span class="line"></span><br><span class="line">pi@raspberrypi:~ $</span><br></pre></td></tr></table></figure>



<h2 id="启用root账号"><a href="#启用root账号" class="headerlink" title="启用root账号"></a>启用root账号</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 修改root密码</span></span><br><span class="line">pi@raspberrypi:~ $ sudo passwd root</span><br><span class="line">New password:</span><br><span class="line">Retype new password:</span><br><span class="line">passwd: password updated successfully</span><br><span class="line"></span><br><span class="line"><span class="comment"># 解锁root账号</span></span><br><span class="line">pi@raspberrypi:~ $ sudo passwd --unlock root</span><br><span class="line">passwd: password expiry information changed.</span><br><span class="line"></span><br><span class="line"><span class="comment"># 切换root账号登录</span></span><br><span class="line">pi@raspberrypi:~ $ su -</span><br><span class="line">Password:</span><br><span class="line"></span><br><span class="line">SSH is enabled and the default password <span class="keyword">for</span> the <span class="string">&#x27;pi&#x27;</span> user has not been changed.</span><br><span class="line">This is a security risk - please login as the <span class="string">&#x27;pi&#x27;</span> user and <span class="built_in">type</span> <span class="string">&#x27;passwd&#x27;</span> to <span class="built_in">set</span> a new password.</span><br><span class="line"></span><br><span class="line">root@raspberrypi:~<span class="comment">#</span></span><br></pre></td></tr></table></figure>



<h2 id="使用root账号进行ssh登录"><a href="#使用root账号进行ssh登录" class="headerlink" title="使用root账号进行ssh登录"></a>使用root账号进行ssh登录</h2><p>修改ssh的配置文件</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">vim /etc/ssh/sshd_config</span><br></pre></td></tr></table></figure>

<p>将配置项<code>PermitRootLogin without-password</code>修改为</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">PermitRootLogin <span class="built_in">yes</span></span><br></pre></td></tr></table></figure>

<p>重启sshd服务</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">systemctl restart sshd</span><br></pre></td></tr></table></figure>




<h2 id="修改pi账号密码"><a href="#修改pi账号密码" class="headerlink" title="修改pi账号密码"></a>修改pi账号密码</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">root@raspberrypi:~<span class="comment"># passwd pi</span></span><br><span class="line">New password:</span><br><span class="line">Retype new password:</span><br><span class="line">passwd: password updated successfully</span><br></pre></td></tr></table></figure>



<h2 id="VNC远程桌面"><a href="#VNC远程桌面" class="headerlink" title="VNC远程桌面"></a>VNC远程桌面</h2><p>进入Pi的系统配置程序</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo raspi-config</span><br></pre></td></tr></table></figure>

<p><img src="https://image.dqv5.com/blog/2020/09/19/1600450739755.png"></p>
<p>选择第5项：<code>5 Interfacing Options</code></p>
<p>选择第3项：<code>P3 VNC</code></p>
<p>出现如下提示时 <code>Would you like the VNC Server to be enabled?</code></p>
<p>选择 <code>Yes</code></p>
<p>然后在电脑上访问这个地址下载个远程桌面软件 - VNC viewer <a target="_blank" rel="noopener" href="https://www.realvnc.com/en/connect/download/viewer/">https://www.realvnc.com/en/connect/download/viewer/</a></p>
<p>打开VNC Viewer，输入树莓派的ip地址进行连接</p>
<p>注意：</p>
<ol>
<li><p>如果启用VNC时系统提示需要安装一些依赖包，可先不进行安装，因为下载软件会比较慢，先参考下文切换镜像源，再重新开启VNC。</p>
</li>
<li><p>Raspberry Pi OS (64 bit) beta test version 暂不支持VNC</p>
</li>
</ol>
<h2 id="切换国内的软件镜像源"><a href="#切换国内的软件镜像源" class="headerlink" title="切换国内的软件镜像源"></a>切换国内的软件镜像源</h2><p>我安装的系统是**Raspberry Pi OS (32-bit)**，参考<a target="_blank" rel="noopener" href="https://mirrors.tuna.tsinghua.edu.cn/help/raspbian/">这个文档</a>修改了以下两个文件</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">vim /etc/apt/sources.list</span><br></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main non-free contrib rpi</span><br><span class="line">deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main non-free contrib rpi</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">#deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi</span></span><br><span class="line"><span class="comment"># Uncomment line below then &#x27;apt-get update&#x27; to enable &#x27;apt-get source&#x27;</span></span><br><span class="line"><span class="comment">#deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi</span></span><br></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">vim /etc/apt/sources.list.d/raspi.list</span><br></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">deb http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ buster main ui</span><br><span class="line"></span><br><span class="line"><span class="comment">#deb http://archive.raspberrypi.org/debian/ buster main</span></span><br><span class="line"><span class="comment"># Uncomment line below then &#x27;apt-get update&#x27; to enable &#x27;apt-get source&#x27;</span></span><br><span class="line"><span class="comment">#deb-src http://archive.raspberrypi.org/debian/ buster main</span></span><br></pre></td></tr></table></figure>

<p>然后执行命令更新软件包列表</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ apt-get update</span><br></pre></td></tr></table></figure>



<h2 id="配置防火墙（iptables）"><a href="#配置防火墙（iptables）" class="headerlink" title="配置防火墙（iptables）"></a>配置防火墙（iptables）</h2><p>只开放22、80、443三个端口</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">iptables -A INPUT -p tcp --dport 22 -j ACCEPT</span><br><span class="line">iptables -A INPUT -p tcp --dport 80 -j ACCEPT</span><br><span class="line">iptables -A INPUT -p tcp --dport 443 -j ACCEPT</span><br></pre></td></tr></table></figure>

<p>关闭所有端口</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">iptables -P INPUT DROP</span><br></pre></td></tr></table></figure>


<p>查看防火墙配置</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">root@raspberrypi:~<span class="comment"># iptables -nL --line-number</span></span><br><span class="line">Chain INPUT (policy DROP)</span><br><span class="line">num  target     prot opt <span class="built_in">source</span>               destination</span><br><span class="line">1    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:22</span><br><span class="line">2    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:80</span><br><span class="line">3    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:443</span><br><span class="line"></span><br><span class="line">Chain FORWARD (policy ACCEPT)</span><br><span class="line">num  target     prot opt <span class="built_in">source</span>               destination</span><br><span class="line"></span><br><span class="line">Chain OUTPUT (policy ACCEPT)</span><br><span class="line">num  target     prot opt <span class="built_in">source</span>               destination</span><br><span class="line">root@raspberrypi:~<span class="comment">#</span></span><br></pre></td></tr></table></figure>



<h2 id="配置防火墙（ufw）"><a href="#配置防火墙（ufw）" class="headerlink" title="配置防火墙（ufw）"></a>配置防火墙（ufw）</h2><p>安装ufw</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">apt-get install ufw</span><br></pre></td></tr></table></figure>

<p>启用并关闭所有外部对本机的访问</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">ufw <span class="built_in">enable</span></span><br><span class="line">ufw default deny</span><br></pre></td></tr></table></figure>

<p>常用命令</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 关闭防火墙</span></span><br><span class="line">ufw <span class="built_in">disable</span></span><br><span class="line"><span class="comment"># 查看防火墙状态</span></span><br><span class="line">ufw status</span><br><span class="line"><span class="comment"># 允许外部访问80端口</span></span><br><span class="line">ufw allow 80 </span><br><span class="line"><span class="comment"># 删除上面建立的允许访问80的规则</span></span><br><span class="line">ufw delete allow 80 </span><br><span class="line"><span class="comment"># 允许此IP访问所有的本机端口</span></span><br><span class="line">ufw allow from 192.168.1.1</span><br><span class="line"><span class="comment"># 禁止外部访问smtp服务</span></span><br><span class="line">ufw deny smtp</span><br><span class="line"><span class="comment"># 删除上面建立的某条规则</span></span><br><span class="line">ufw delete allow smtp </span><br><span class="line"></span><br></pre></td></tr></table></figure>



<h2 id="安装docker"><a href="#安装docker" class="headerlink" title="安装docker"></a>安装docker</h2><p>下载安装脚本</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ curl -fsSL https://get.docker.com -o get-docker.sh</span><br></pre></td></tr></table></figure>

<p>编辑脚本，找到mirrors部分，增加清华大学的镜像源，修改后的文件如下：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">...</span><br><span class="line">case &quot;$mirror&quot; in</span><br><span class="line">	Tsinghua)</span><br><span class="line">		DOWNLOAD_URL=&quot;https://mirrors.tuna.tsinghua.edu.cn/docker-ce&quot;</span><br><span class="line">		;;</span><br><span class="line">	Aliyun)</span><br><span class="line">		DOWNLOAD_URL=&quot;https://mirrors.aliyun.com/docker-ce&quot;</span><br><span class="line">		;;</span><br><span class="line">	AzureChinaCloud)</span><br><span class="line">		DOWNLOAD_URL=&quot;https://mirror.azure.cn/docker-ce&quot;</span><br><span class="line">		;;</span><br><span class="line">esac</span><br><span class="line">...</span><br></pre></td></tr></table></figure>

<p>指定镜像进行安装</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ sh get-docker.sh --mirror Tsinghua</span><br></pre></td></tr></table></figure>



<h2 id="切换docker国内镜像地址"><a href="#切换docker国内镜像地址" class="headerlink" title="切换docker国内镜像地址"></a>切换docker国内镜像地址</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ vim /etc/docker/daemon.json</span><br></pre></td></tr></table></figure>

<figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line">  <span class="attr">&quot;registry-mirrors&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="string">&quot;https://docker.mirrors.ustc.edu.cn&quot;</span><span class="punctuation">]</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ systemctl restart docker</span><br></pre></td></tr></table></figure>



<p>注：只重启docker可能会不生效，重启树莓派再试</p>
<h2 id="安装seafile"><a href="#安装seafile" class="headerlink" title="安装seafile"></a>安装seafile</h2><p>docker-compose方式安装文档：<a target="_blank" rel="noopener" href="https://cloud.seafile.com/published/seafile-manual-cn/docker/%E7%94%A8Docker%E9%83%A8%E7%BD%B2Seafile.md">https://cloud.seafile.com/published/seafile-manual-cn/docker/%E7%94%A8Docker%E9%83%A8%E7%BD%B2Seafile.md</a></p>
<p>安装docker-compose</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ apt-get install -y docker-compose</span><br></pre></td></tr></table></figure>

<p>下载并修改<code>docker-compose.yml</code>文件</p>
<p>启动</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ docker-compose up -d</span><br></pre></td></tr></table></figure>



<h2 id="最后"><a href="#最后" class="headerlink" title="最后"></a>最后</h2><p>折腾了半天，seafile启动失败了。。。先睡觉，明天再看吧。</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">root@raspberrypi:/opt/seafile<span class="comment"># docker-compose up -d</span></span><br><span class="line">Creating network <span class="string">&quot;seafile_seafile-net&quot;</span> with the default driver</span><br><span class="line">Creating seafile-mysql     ... <span class="keyword">done</span></span><br><span class="line">Creating seafile-memcached ... <span class="keyword">done</span></span><br><span class="line">Creating seafile           ... <span class="keyword">done</span></span><br><span class="line">root@raspberrypi:/opt/seafile<span class="comment"># docker logs -f seafile</span></span><br><span class="line">standard_init_linux.go:211: <span class="built_in">exec</span> user process caused <span class="string">&quot;exec format error&quot;</span></span><br></pre></td></tr></table></figure>



<h2 id="后续"><a href="#后续" class="headerlink" title="后续"></a>后续</h2><p>上面安装seafile失败的原因是：seafile官方的docker镜像是基于<code>amd64</code>架构的，而我的树莓派4b安装的系统是<strong>Raspberry Pi OS (64 bit) beta test version</strong> ，是<code>aarch64</code>的，系统不兼容。</p>
<p><img src="https://image.dqv5.com/blog/2020/09/20/1600537498438.png"></p>
<p>后来我又尝试安装seafile的<a target="_blank" rel="noopener" href="https://github.com/haiwen/seafile-rpi/releases">树莓派专用版本</a>，又遇到了一些问题，因为seafile的树莓派版本是32位的软件。</p>
<p>然后我又重新刷了树莓派系统，刷成了**Raspberry Pi OS (32 bit)**，再次安装seafile的树莓派版本才最终成功。</p>
<p>不过用32位的系统也有坑，就是好多软件已经慢慢不支持32位系统了，希望官方早点出64位系统正式版。</p>
<h2 id="seafile软件展示"><a href="#seafile软件展示" class="headerlink" title="seafile软件展示"></a>seafile软件展示</h2><p>seafile是一个比较好的家庭私有云解决方案，一定程度上可以代替百度云。</p>
<p>官网：<a target="_blank" rel="noopener" href="https://seafile.com/">https://seafile.com/</a></p>
<p>在树莓派上搭建一套seafile，家人可以把照片、视频、文档传上去，走路由器内网，上传、下载速度甩百度云几条街。</p>
<p>打电信客服电话10000申请一个固定ip地址，再在天翼网关和无线路由器上做好端口转发，同时设置ip和mac地址绑定，即可将树莓派的端口映射到外网，这样不在家也可以访问seafile上的文件。</p>
<p>安装完成效果图：</p>
<p><img src="https://image.dqv5.com/blog/2020/09/20/1600537519653.png"></p>
<p>手机端：</p>
<p><img src="https://image.dqv5.com/blog/2020/09/20/1600537935223.png"></p>

    </div>

    
    
    

    <footer class="post-footer">
          <div class="reward-container">
  <div>请我一杯咖啡吧！</div>
  <button>
    赞赏
  </button>
  <div class="post-reward">
      <div>
        <img src="/images/wechatpay.jpg" alt="du qian 微信">
        <span>微信</span>
      </div>
      <div>
        <img src="/images/alipay.jpg" alt="du qian 支付宝">
        <span>支付宝</span>
      </div>

  </div>
</div>

          <div class="post-tags">
              <a href="/tags/%E6%A0%91%E8%8E%93%E6%B4%BE/" rel="tag"># 树莓派</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/2020/09/11/pd-windows-keys/" rel="prev" title="PD虚拟机中Windows远程桌面组合键失灵的解决办法">
                  <i class="fa fa-angle-left"></i> PD虚拟机中Windows远程桌面组合键失灵的解决办法
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/2020/12/12/auto-gray/" rel="next" title="国家公祭日网站置灰代码">
                  国家公祭日网站置灰代码 <i class="fa fa-angle-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






    <div class="comments gitalk-container"></div>
</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">

  <div class="beian"><a href="https://beian.miit.gov.cn/" rel="noopener" target="_blank">冀ICP备17034993号-1 </a>
  </div>
  <div class="copyright">
    &copy; 2016 – 
    <span itemprop="copyrightYear">2024</span>
    <span class="with-love">
      <i class="fa fa-heart"></i>
    </span>
    <span class="author" itemprop="copyrightHolder">du qian</span>
  </div>
<div class="busuanzi-count">
    <span class="post-meta-item" id="busuanzi_container_site_uv">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-item" id="busuanzi_container_site_pv">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/mist/" rel="noopener" target="_blank">NexT.Mist</a> 强力驱动
  </div>
  <div class="upyun-league">
    本网站由<a target="_blank" rel="noopener" href="https://www.upyun.com/?utm_source=lianmeng&utm_medium=referral" style="border-bottom: none;">
      <img src="/images/upyun_logo.png" alt="又拍云" style="display: inline;height: 30px;vertical-align: bottom;"/>
    </a>提供CDN加速/云存储服务
  </div>


    </div>
  </footer>

  
  <div class="toggle sidebar-toggle" role="button">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>
  <div class="sidebar-dimmer"></div>
  <div class="back-to-top" role="button" aria-label="返回顶部">
    <i class="fa fa-arrow-up fa-lg"></i>
    <span>0%</span>
  </div>

  <a href="https://github.com/duqian42707" class="github-corner" title="在 GitHub 上关注我" aria-label="在 GitHub 上关注我" rel="noopener" target="_blank"><svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


  
  <script src="/lib/animejs/lib/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
<script src="/js/comments.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/sidebar.js"></script><script src="/js/next-boot.js"></script>

  <script src="/lib/hexo-generator-searchdb/dist/search.js" integrity="sha256-1kfA5uHPf65M5cphT2dvymhkuyHPQp5A53EGZOnOLmc=" crossorigin="anonymous"></script>
<script src="/js/third-party/search/local-search.js"></script>


  <script class="next-config" data-name="mermaid" type="application/json">{"enable":true,"theme":"forest","js":{"url":"/lib/mermaid/dist/mermaid.min.js","integrity":"sha256-G8ouPAnw4zzMbnAenHnVz6h9XpKbNdOkrqTh7AadyHs="}}</script>
  <script src="/js/third-party/tags/mermaid.js"></script>





  
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>




<link rel="stylesheet" href="/lib/gitalk/dist/gitalk.css" integrity="sha256-AJnUHL7dBv6PGaeyPQJcgQPDjt/Hn/PvYZde1iqfp8U=" crossorigin="anonymous">

<script class="next-config" data-name="gitalk" type="application/json">{"enable":true,"github_id":"duqian42707","repo":"blog-comment","client_id":"c9f48bc2fea3d4ce5d93","client_secret":"154d6227d3d7b532b36bfc1ce030121f0263ac90","admin_user":"duqian42707","distraction_free_mode":false,"proxy":"https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token","language":"zh-CN","js":{"url":"/lib/gitalk/dist/gitalk.min.js","integrity":"sha256-MVK9MGD/XJaGyIghSVrONSnoXoGh3IFxLw0zfvzpxR4="},"path_md5":"9398054ca7d57f03957415a743342a05"}</script>
<script src="/js/third-party/comments/gitalk.js"></script>

</body>
</html>
